<?php

namespace app\parking\controller\mobile;

use think\admin\Controller;
use think\Request;
use app\parking\service\ParkingService;

class Index extends Controller
{
    public function pay(Request $request)
    {
        $plateNumber = $request->get('plate_number');
        $result = ParkingService::calculateFee($plateNumber);
        return json($result);
    }

    public function calculateFee(Request $request)
    {
        $plateNumber = $request->post('plate_number');
        $result = ParkingService::calculateFee($plateNumber);
        return json($result);
    }
}
